package sc.writable;

import org.apache.hadoop.io.IntWritable;

/**
 * Writtable Array for int types
 * 
 * @author Quentin Rossé
 *
 */
public class WritableArrayListInteger extends WritableArrayList<IntWritable>{
	
	public WritableArrayListInteger(){
		super(IntWritable.class);
	}
	
	/**
	 * return the float value at the i th position in the array 
	 * @param i
	 * @return
	 */
	public float getFloat(int i){
		return super.get(i).get();
	}
	
	public void add(int f){
		super.add(new IntWritable(f));
	}
	

	public void add(int f, int maxsize){
		super.add(new IntWritable(f), maxsize);
	}
}
